<template>
    <div class="common-layout">
        <el-container>
            <!-- 左边 -->
            <el-aside width="240px" class="left-aside-bar">
                <el-container>
                    <el-header class="img">
                    </el-header>
                    <el-main>
                        <el-menu class="ul-total el-menu-vertical-demo">
                            <li>
                                <el-icon>
                                    <User />
                                </el-icon>
                                <span>用户管理</span>
                                <el-menu :router="true">
                                    <el-menu-item index="/index/userlist">用户列表</el-menu-item>
                                    <el-menu-item index="/index/loginlist">登录记录</el-menu-item>
                                </el-menu>
                            </li>
                            <li>
                                <el-icon>
                                    <Collection />
                                </el-icon>
                                <span>作品管理</span>
                                <el-menu :router="true">
                                    <el-menu-item index="/index/opus">作品列表</el-menu-item>
                                    <!-- <el-menu-item>盲盒列表</el-menu-item> -->
                                    <el-menu-item index="/index/tokensList">通证列表</el-menu-item>
                                    <!-- <el-menu-item>回收记录</el-menu-item> -->
                                    <el-menu-item index="/index/typelist">系列设置</el-menu-item>
                                </el-menu>
                            </li>
                            <li>
                                <el-icon>
                                    <ShoppingTrolley />
                                </el-icon>
                                <span>订单管理</span>
                                <el-menu :router="true">
                                    <el-menu-item index="/index/artorders">作品订单</el-menu-item>
                                    <el-menu-item>盲盒订单</el-menu-item>
                                    <el-menu-item index="/index/marketorders">市场订单</el-menu-item>
                                    <el-menu-item>赠与记录</el-menu-item>
                                    <el-menu-item>补单管理</el-menu-item>
                                    <el-menu-item>提货记录</el-menu-item>
                                </el-menu>
                            </li>
                            <li>
                                <el-icon>
                                    <Mouse />
                                </el-icon>
                                <span>内容管理</span>
                                <el-menu :router="true">
                                    <el-menu-item>轮播管理</el-menu-item>
                                    <el-menu-item index="/index/marquee">公告管理</el-menu-item>
                                    <el-menu-item>帮助中心</el-menu-item>
                                    <el-menu-item>文档管理</el-menu-item>
                                </el-menu>
                            </li>
                            <li>
                                <el-icon>
                                    <WalletFilled />
                                </el-icon>
                                <span>结算中心</span>
                                <el-menu :router="true">
                                    <el-menu-item index="/index/withdrawal">提现记录</el-menu-item>
                                </el-menu>
                            </li>
                        </el-menu>
                    </el-main>
                </el-container>
            </el-aside>
            <!-- 右边 -->
            <el-main class="right-main-info">
                <el-container>
                    <el-header>
                        <div class="dec">
                            <span>欢迎您, {{username}}!</span>
                            <span @click="exit">
                                <el-icon>
                                    <Pointer />
                                </el-icon>
                                退出登录
                            </span>
                        </div>

                    </el-header>
                    <el-main >
                      
                        <div class="main-infos-box">
                            <router-view></router-view>
                        </div>
                    </el-main>
                </el-container>
            </el-main>
        </el-container>
    </div>
</template>

<script>
export default {
    name: 'VueIndex',

    data() {
        return {
            ass: '/index/userlist',
            username:window.sessionStorage.getItem("username")
        };
    },

    methods: {
        exit(){
            window.sessionStorage.removeItem("username");
            this.$router.replace("/login");
        }
    }
};
</script>

<style lang="css" scoped>
.img {
    background: url("../assets/font3.png") no-repeat;
    background-size: 80%;
    background-position: center center;
}

.left-aside-bar {
    background: #fff;

}

.left-aside-bar .el-header {
    color: #C086FF;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    line-height: 60px;

}

.el-header {
    height: 60px !important;
}

.right-main-info .el-header div {
    float: right;
    line-height: 60px;
    font-size: 13px;
    color: #525252;
}

.right-main-info .el-header div span:first-child {
    margin-right: 10px;
}

.right-main-info .el-header div span:last-child {
    cursor: pointer;
}

.el-header {
    height: 100px;
}

.el-main {
    padding: 0 !important;
}

.right-main-info .el-main {
    background-color: #F2F3F7;
}

.main-infos-box {
    background-color: #fff;
    height: 100%;
    width: 95%;
    margin: 10px auto;
    border-radius: 20px;
    /* text-indent: 1rem; */
}


/* 左侧  侧边栏 */

.left-aside-bar ul.ul-total {
    width: 90%;
    margin: 0 auto;
    height: 100%;

}

.left-aside-bar ul.ul-total>li {
    margin-top: 20px;
    margin-left: 10px;
    color: rgb(8, 8, 8);
    font-weight: bold;
    border-bottom: 1px solid silver;
}

.left-aside-bar ul.ul-total>li .el-icon {
    font-size: 16px;
    margin-right: 5px;
}

.left-aside-bar ul.ul-total ul {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.left-aside-bar ul.ul-total ul li {
    margin-top: 10px;
    padding: 5px;
    cursor: pointer;
    color: #919194;
    border-radius: 5px;
}

.active {
    background-color: #5264EE;
    color: #fff !important;
}

.el-menu {
    background-color: transparent !important;
    border-right: none !important;
}

.el-menu-item {
    padding: 10px !important;
    height: 30px !important;
}

.el-menu-item:hover {
    background-color: #5F6FED !important;
    color: #fff !important;
}

/* 美化滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    width: 6px;
    background: rgba(#cee8e3, 0.1);
    -webkit-border-radius: 2em;
    -moz-border-radius: 2em;
    border-radius: 2em;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(144, 147, 153, .5);
    background-clip: padding-box;
    min-height: 28px;
    -webkit-border-radius: 2em;
    -moz-border-radius: 2em;
    border-radius: 2em;
    transition: background-color .3s;
    cursor: pointer;
}

::-webkit-scrollbar-thumb:hover {
    background-color: rgba(144, 147, 153, .3);
}

/* 内容区域 */
.main-infos-box {
    box-sizing: border-box;
    padding: 20px;
}

.dec span {
    font-weight: 600;
}

.dec span:last-child {
    color: #852CEA;
}

</style>